from rest_framework import serializers
from .models import Agent, Workflow, WorkflowExecution

class AgentSerializer(serializers.ModelSerializer):
    class Meta:
        model = Agent
        fields = '__all__'
        read_only_fields = ('created_at', 'updated_at')

class WorkflowSerializer(serializers.ModelSerializer):
    class Meta:
        model = Workflow
        fields = '__all__'
        read_only_fields = ('created_at', 'updated_at')

class WorkflowExecutionSerializer(serializers.ModelSerializer):
    class Meta:
        model = WorkflowExecution
        fields = '__all__'
        read_only_fields = ('status', 'created_at', 'started_at', 'completed_at')